Skip to content

Add a clang format file and a CI that checks formatting issues - #51

Merged
RaulPPelaez merged 24 commits into
mainfrom
formatting
Jun 26, 2025
Merged

Add a clang format file and a CI that checks formatting issues#51
RaulPPelaez merged 24 commits into
mainfrom
formatting

Conversation

@RaulPPelaez

Copy link
Copy Markdown
Contributor

Its time to settle on some automated formatting. The CI in this repo will complain if the correct formatting is not used.

@stochasticHydroTools stochasticHydroTools deleted a comment from github-actions Bot Jun 25, 2025
@RaulPPelaez

Copy link
Copy Markdown
Contributor Author

@rykerfish , in principle, the .git-blame-ignore-revs will make it so that tools will ignore the commits in there for the purposes of git blame. Now, I am not sure how automatic this is in practice (for instance, you have to configure manually in your local git).
At this point AFAICT it looks just like a sensible investment for a future in which it is well supported.

@github-actions

github-actions Bot commented Jun 26, 2025

Copy link
Copy Markdown

Linter reported no issues

All Python files are correctly formatted with Black.

@github-actions

Copy link
Copy Markdown

Linter reported no issues

All C/C++ files are correctly formatted with clang-format.

@RaulPPelaez

RaulPPelaez commented Jun 26, 2025

Copy link
Copy Markdown
Contributor Author

Also, sometimes one really needs to turn off clang-format in a section of a file (like a pretty comment), you can do this:

\\ clang-format off
\\ This    will be ignored  by     clang-format 
\\ clang-format on

@RaulPPelaez
RaulPPelaez merged commit af79eed into main Jun 26, 2025
3 of 4 checks passed
@RaulPPelaez
RaulPPelaez deleted the formatting branch June 26, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant